package oop.multiform.Running;

public class Hero {
    private String name;
    private Pet pet;

    public void run(){
        System.out.println("hero跑");
        this.pet.follow();
    }

    public Hero(String name) {
        this.name = name;
    }

    public Hero(String name, Pet pet) {
        this.name = name;
        this.pet = pet;
    }
}
